/*
 * translation_matching.h
 *
 *  Created on: Oct 22, 2011
 *      Author: tqlong
 */

#ifndef TRANSLATION_MATCHING_H_
#define TRANSLATION_MATCHING_H_

#include <map>
#include "image_feature.h"

class NaiveTranslationMatching
{
public:
  typedef std::map<int, int> map_type;
  typedef map_type::value_type map_value;
public:
  void match(const FeatureList& lList, const FeatureList& rList);
  void mark(cv::Mat& l_r, const cv::Mat& lTrans, const cv::Mat& rTrans);
public:
  map_type l2r_, r2l_;
  FeatureList lList_, rList_;
  cv::Mat max_transform_;
  double tol_;
protected:
  int count_match(const cv::Mat& transform);
  void do_match(const cv::Mat& transform);
  cv::Point2d transform(const cv::Mat& transform, cv::Point2d p);
};

#endif /* TRANSLATION_MATCHING_H_ */
